package com.design.designmode.action.mediator;

/**
 * @author hxl
 * @since 2023-04-18
 */
public class Main {
    public static void main(String[] args) {
        ConcreteMediator mediator = new ConcreteMediator();

        ColleagueA colleagueA = new ColleagueA(mediator);
        ColleagueB colleagueB = new ColleagueB(mediator);
        ColleagueC colleagueC = new ColleagueC(mediator);

        mediator.setColleagueA(colleagueA);
        mediator.setColleagueB(colleagueB);
        mediator.setColleagueC(colleagueC);

        colleagueA.sendMessage("软考加油");
        colleagueC.sendMessage("祝大家软考顺利通过！");

    }
}
